package org.java;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;

public class DoDataTime {
public static void main(String[] args) {
	Calendar calendar = Calendar.getInstance();
	String dateTime;
	String shard;
	String standard_time = "946656000000";  //20000101000000
	long timeInMillis;
	dateTime = "20130602";
	
	long tagTime = System.currentTimeMillis();
	
	try {
		Calendar c = Calendar.getInstance();
		SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");//时间格式
		c.setTime(sdf.parse(dateTime));
		timeInMillis = c.getTimeInMillis();
		//System.out.println("时间转化后的毫秒数为：" + c.getTimeInMillis());
	} catch (ParseException e) {
		e.printStackTrace();
	}
	long endTime = System.currentTimeMillis()-tagTime;
	System.out.println(endTime);
}
}
